<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>修改用户信息</title>
</head>
<body>
<h1>修改信息页面</h1>
<div>
    <input type="text" placeholder="请输入需要修改的id" v-model="user.id">
    <input type="text" placeholder="用户名" v-model="user.username">
    <input type="password" placeholder="密码" v-model="user.password">
    <input type="text" placeholder="昵称" v-model="user.nickname">
    <input type="button" value="修改" @click="update()">
</div>
<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<script>
    let v=new Vue({
        el:"div",
        data:{
            user:{
                id:"",
                username:"",
                password:"",
                nickname:""
            }
        },
        methods:{
            update(){
                axios.post("/update",v.user).then(function () {
                    location.href="/select"
                    alert("修改成功!")
                })
            }
        }
    })
</script>
</body>
</html>